import bsddb,os
from Bio import GenBank

d = bsddb.btopen('fc_just_seq.bsd', 'n')

for fn in os.listdir('fc'):
    print fn 
    f = open('fc/%s'%fn)
    p = GenBank.RecordParser()
    it = GenBank.Iterator(f, p)

    while True:
        c = it.next()
        if not c: break
        d[c.gi] = c.sequence
        #d[c.gi] = c.__str__()

d.close()
f.close()

